<template>
  <view class="content">

    <view class="address">
      <view class="addressone">
        <view style="margin-right:24rpx;">小王</view>
        <view>17605277797</view>
      </view>
      <view class="addresstwo">
        <view style="margin-right:24rpx;">
          <u-icon color="#000000" size="40" name="map-fill"></u-icon>
        </view>
        <view>天津城市蓟州区中南新村</view>
      </view>
    </view>
    <view class="ordersmain">
      <view class="ordermainone">
        <view class="orderleft">百果园（蓟县创业街店）</view>


        <view class="orderright">申请退款</view>

      </view>
      <view class="ordermaintwo" v-for="(item, index) in shoplist" :key="index">
        <view>
          <image :src="item.img" mode="scaleToFill" />
        </view>
        <view style="flex: 1;">
          <view class="ordertwoname">{{ item.name }}</view>
          <view class="ordertwonum">
            <text class="ordertwotop">x{{ item.shopnum }}</text>
            <view>
              <text class="ordertwobottom">￥</text>
              <text class="orderbottomtwo">{{ item.price * item.shopnum }}</text>
            </view>
          </view>
        </view>
      </view>
      <view style="font-weight: 400;font-size: 32rpx;color: #999999;">
        物流费:￥40
      </view>
      <view class="pay">
        <view>支付方式</view>
        <view style="display:flex; align-items:center;">
          <view style="display:flex; align-items:center;">
            <image src="../static/image/pagesDelivery/alipay.png" mode="scaleToFill" />
          </view>
          <view style="font-weight: 600; color: #424141;">
            <text>支付宝</text>
          </view>
        </view>
      </view>

    </view>
    <view class="ordersnum">
      <view class="ordersone">
        <view>订单编号</view>
        <view>
          adasdasdawdd
          <text style="padding:6rpx 12rpx; background-color:#F3F3F3; color:#333333; margin-left:24rpx;">复制</text>
        </view>
      </view>
      <view class="ordersone">
        <view>下单时间</view>
        <view>2024.06.18 09:48</view>
      </view>
      <view class="ordersone">
        <view>退款时间</view>
        <view>2024.06.18 18:48</view>
      </view>
      <view class="ordersone">
        <view>订单金额</view>
        <view style="color: #D12C25;">￥{{ shoplist[0].price * shoplist[0].shopnum }}</view>
      </view>
      <view class="ordersone">
        <view>退款金额</view>
        <view style="color: #D12C25;">￥{{ shoplist[0].price * shoplist[0].shopnum }}</view>
      </view>
      <view class="ordersone">
        <view>物流单号</view>
        <view>
          1154541581818
          <text style="padding:6rpx 12rpx; background-color:#F3F3F3; color:#333333; margin-left:24rpx;">复制</text>
        </view>
      </view>
      <view class="ordersone">
        <view>联系商家</view>
        <view>
          <u-icon color="#D12C25" name="phone-fill"></u-icon>
        </view>
      </view>
      <view class="ordersone">
        <view>物流图片</view>

      </view>
      <view class="ordersone">
        <image style="width:156rpx; height:132rpx; border-radius: 12rpx;"
          src="https://tse2-mm.cn.bing.net/th/id/OIP-C.IfSNv6ECRESLePJIM5MIBgHaEz?w=243&h=180&c=7&r=0&o=5&pid=1.7"
          mode="scaleToFill" />

      </view>
    </view>
    <view @tap="gotorefund" class="gotopay">
      <text>申请退款</text>
    </view>

  </view>
</template>

<script>
let that = null;
export default {
  data() {
    return {
      shoplist: [
        {
          id: "0",
          img:
            "https://img2.baidu.com/it/u=3597756135,179698068&fm=253&app=120&size=w931&n=0&f=JPEG&fmt=auto?sec=1718902800&t=24043e4e9fb78f26c6f85e62aa0f87c2",
          name: "好西瓜好西瓜好西瓜好西瓜好西瓜好西瓜",
          num: 50,
          price: 12,
          rightType: false,
          shopnum: 2
        }
      ],
      //取消订单选择
      list: [
        {
          name: "价格有点贵",
          disabled: false
        },
        {
          name: "买错了",
          disabled: false
        },
        {
          name: "收货地址选错",
          disabled: false
        },
        {
          name: "暂时不需要了",
          disabled: false
        },
        {
          name: "其他",
          disabled: false
        }
      ],
      valuerradio: "orange",
      addlist: [],
      paypop: 0,
      showinput: false,
      value: "",
      type: "textarea",
      border: true,
      height: 100,
      autoHeight: true,
      show: false,
      showorders: false
    };
  },
  onLoad() {
    that = this;
    const eventChannel = that.getOpenerEventChannel();
    // 监听redactInfo事件，获取上一页面通过eventChannel传送到当前页面的数据
    eventChannel.on("redactInfo", function (data) {
      console.log("获取到信息", data.shoplist);
    });
  },
  methods: {
    goback() {
      uni.navigateBack({
        delta: 1
      });
    },
    remark() {
      if (this.paypop == 0) {
        console.log(111);
        this.showinput = true;
      }
    },
    gotoendpay() { },
    // 选中某个单选框时，由radio时触发
    radioChange(e) {
      // console.log(e);
    },
    // 选中任一radio时，由radio-group触发
    radioGroupChange(e) {
      // console.log(e);
    },


    gotorefund() {
      uni.navigateTo({
        url: '/pagesHealth/healthBack'
      })
    }
  }
};
</script>

<style scoped lang="scss">
.content {
  min-height: 100vh;
  width: 100vw;
  background-color: #e6e6e6;
  display: flex;
  flex-direction: column;
  padding: 0 32rpx calc(120rpx + env(safe-area-inset-bottom)) 32rpx;






  .address {
    background: white;
    border-radius: 12rpx;
    margin-top: 28rpx;
    padding: 32rpx 0 24rpx 32rpx;
    font-family: PingFang SC, PingFang SC;
    font-weight: 400;
    font-size: 28rpx;
    color: #000000;

    .addressone {
      display: flex;
      justify-content: start;
      margin-bottom: 24rpx;
      align-items: center;
    }

    .addresstwo {
      display: flex;
      justify-content: start;
      align-items: center;
    }
  }

  .ordersmain {
    border-radius: 12rpx 12rpx 12rpx 12rpx;
    padding: 32rpx 22rpx;
    background-color: white;
    margin: 18rpx 0;
    font-family: PingFang SC, PingFang SC;
    font-weight: 400;
    font-size: 32rpx;
    color: #000000;

    .ordermainone {
      display: flex;
      justify-content: space-between;

      .orderleft {
        font-family: PingFang SC, PingFang SC;
        font-weight: 400;
        font-size: 32rpx;
        color: #000000;

        font-style: normal;
      }

      .orderright {
        font-family: PingFang SC, PingFang SC;
        font-weight: 400;
        font-size: 28rpx;
        color: #d12c25;

        font-style: normal;
      }
    }

    .ordermaintwo {
      display: flex;
      margin-top: 18rpx;

      image {
        width: 156rpx;
        height: 132rpx;
      }

      .ordertwoname {
        padding: 0 0 38rpx 24rpx;
        font-family: PingFang SC, PingFang SC;
        font-weight: 400;
        font-size: 32rpx;
        color: #000000;
        line-height: 38rpx;
        font-style: normal;
      }

      .ordertwonum {
        display: flex;
        justify-content: space-between;
        padding-left: 24rpx;
        align-items: center;

        .ordertwotop {
          font-family: PingFang SC, PingFang SC;
          font-weight: 400;
          font-size: 26rpx;
          color: #999999;
        }

        .ordertwobottom {
          font-family: PingFang SC, PingFang SC;
          font-weight: bold;
          font-size: 28rpx;
          color: #ff0000;
        }

        .orderbottomtwo {
          font-family: PingFang SC, PingFang SC;
          font-weight: bold;
          font-size: 40rpx;
          color: #ff0000;
        }
      }
    }



    .pay {
      margin-top: 18rpx;
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-family: PingFang SC, PingFang SC;
      font-weight: 400;
      font-size: 32rpx;
      color: #000000;
      font-style: normal;

      image {
        width: 36rpx;
        height: 36rpx;
        margin-right: 14rpx;
      }
    }

    .remark {
      display: flex;
      justify-content: space-between;
      margin-top: 18rpx;
      font-family: PingFang SC, PingFang SC;
      font-weight: 400;
      font-size: 32rpx;
      color: #000000;
      align-items: center;
    }
  }

  .ordersnum {
    padding: 0 24rpx 32rpx 24rpx;
    background-color: white;
    font-family: PingFang SC, PingFang SC;
    font-weight: 400;
    font-size: 28rpx;
    color: #000000;
    border-radius: 12rpx;

    .ordersone {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 24rpx;
    }
  }

  .gotopay {
    text-align: center;
    padding: 26rpx 278rpx;
    background-color: #D12C25;
    color: white;
    border-radius: 1998rpx;
    position: fixed;
    bottom: 64rpx;
    font-weight: bold;
    font-size: 32rpx;
  }
}
</style>